package com.smart.campus.school.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.AppConfigMapper;
import com.smart.campus.school.domain.AppConfig;
import com.smart.campus.school.service.IAppConfigService;
import com.smart.campus.common.core.text.Convert;

/**
 * app段配置项Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2020-12-02
 */
@Service
public class AppConfigServiceImpl implements IAppConfigService 
{
    @Autowired
    private AppConfigMapper appConfigMapper;

    /**
     * 查询app段配置项
     * 
     * @param id app段配置项ID
     * @return app段配置项
     */
    @Override
    public AppConfig selectAppConfigById(Long id)
    {
        return appConfigMapper.selectAppConfigById(id);
    }

    /**
     * 查询app段配置项列表
     * 
     * @param appConfig app段配置项
     * @return app段配置项
     */
    @Override
    public List<AppConfig> selectAppConfigList(AppConfig appConfig)
    {
        return appConfigMapper.selectAppConfigList(appConfig);
    }

    /**
     * 新增app段配置项
     * 
     * @param appConfig app段配置项
     * @return 结果
     */
    @Override
    public int insertAppConfig(AppConfig appConfig)
    {
        return appConfigMapper.insertAppConfig(appConfig);
    }

    /**
     * 修改app段配置项
     * 
     * @param appConfig app段配置项
     * @return 结果
     */
    @Override
    public int updateAppConfig(AppConfig appConfig)
    {
        return appConfigMapper.updateAppConfig(appConfig);
    }

    /**
     * 删除app段配置项对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAppConfigByIds(String ids)
    {
        return appConfigMapper.deleteAppConfigByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除app段配置项信息
     * 
     * @param id app段配置项ID
     * @return 结果
     */
    @Override
    public int deleteAppConfigById(Long id)
    {
        return appConfigMapper.deleteAppConfigById(id);
    }

    @Override
    public List<AppConfig> selectAppConfigListBySort(AppConfig config) {
        return appConfigMapper.selectAppConfigListBySort(config);
    }
}
